package com.easonji.attendance.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 请假
 * </p>
 *
 * @author easonji
 * @since 2018-10-03
 */

@TableName("att_leave")

public class Leave extends Model<Leave> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "le_id", type = IdType.AUTO)
    private Integer leId;

    @NotEmpty(message = "请假开始时间不能为空")
    @TableField("le_str_date")
    private String leStrDate;

    @NotEmpty(message = "请假结束时间不能为空")
    @TableField("le_end_date")
    private String leEndDate;

    @TableField("le_user")
    private Integer leUser;

    @TableField("le_state")
    private Integer leState;

    @NotEmpty(message = "请假原因不能为空")
    @TableField("le_memo")
    private String leMemo;

    @TableField("le_create_user")
    private Integer leCreateUser;

    @TableField("le_create_date")
    private Date leCreateDate;

    @TableField("le_update_user")
    private Integer leUpdateUser;

    @TableField("le_update_date")
    private Date leUpdateDate;

    @NotNull(message = "请假类型不能为空")
    @TableField("le_type")
    private Integer leType;

    @TableField("le_next_auditor")
    private Integer leNextAuditor;

    public Integer getLeId() {
        return leId;
    }

    public void setLeId(Integer leId) {
        this.leId = leId;
    }

    public String getLeStrDate() {
        return leStrDate;
    }

    public void setLeStrDate(String leStrDate) {
        this.leStrDate = leStrDate;
    }

    public String getLeEndDate() {
        return leEndDate;
    }

    public void setLeEndDate(String leEndDate) {
        this.leEndDate = leEndDate;
    }

    public Integer getLeUser() {
        return leUser;
    }

    public void setLeUser(Integer leUser) {
        this.leUser = leUser;
    }
    public Integer getLeState() {
        return leState;
    }

    public void setLeState(Integer leState) {
        this.leState = leState;
    }
    public String getLeMemo() {
        return leMemo;
    }

    public void setLeMemo(String leMemo) {
        this.leMemo = leMemo;
    }
    public Integer getLeCreateUser() {
        return leCreateUser;
    }

    public void setLeCreateUser(Integer leCreateUser) {
        this.leCreateUser = leCreateUser;
    }
    public Date getLeCreateDate() {
        return leCreateDate;
    }

    public void setLeCreateDate(Date leCreateDate) {
        this.leCreateDate = leCreateDate;
    }
    public Integer getLeUpdateUser() {
        return leUpdateUser;
    }

    public void setLeUpdateUser(Integer leUpdateUser) {
        this.leUpdateUser = leUpdateUser;
    }
    public Date getLeUpdateDate() {
        return leUpdateDate;
    }

    public void setLeUpdateDate(Date leUpdateDate) {
        this.leUpdateDate = leUpdateDate;
    }
    public Integer getLeType() {
        return leType;
    }

    public void setLeType(Integer leType) {
        this.leType = leType;
    }
    public Integer getLeNextAuditor() {
        return leNextAuditor;
    }

    public void setLeNextAuditor(Integer leNextAuditor) {
        this.leNextAuditor = leNextAuditor;
    }

    @Override
    protected Serializable pkVal() {
        return this.leId;
    }

    @Override
    public String toString() {
        return "Leave{" +
        "leId=" + leId +
        ", leStrDate=" + leStrDate +
        ", leEndDate=" + leEndDate +
        ", leUser=" + leUser +
        ", leState=" + leState +
        ", leMemo=" + leMemo +
        ", leCreateUser=" + leCreateUser +
        ", leCreateDate=" + leCreateDate +
        ", leUpdateUser=" + leUpdateUser +
        ", leUpdateDate=" + leUpdateDate +
        ", leType=" + leType +
        ", leNextAuditor=" + leNextAuditor +
        "}";
    }
}
